Integrand size = 23, antiderivative size = 449 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=-\frac {3 \cos \left (2 e-\frac {2 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right )}{8 a^3 d}+\frac {3 \cos \left (4 e-\frac {4 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {4 c f}{d}+4 f x\right )}{8 a^3 d}-\frac {\cos \left (6 e-\frac {6 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {6 c f}{d}+6 f x\right )}{8 a^3 d}+\frac {\log (c+d x)}{8 a^3 d}-\frac {i \operatorname {CosIntegral}\left (\frac {6 c f}{d}+6 f x\right ) \sin \left (6 e-\frac {6 c f}{d}\right )}{8 a^3 d}+\frac {3 i \operatorname {CosIntegral}\left (\frac {4 c f}{d}+4 f x\right ) \sin \left (4 e-\frac {4 c f}{d}\right )}{8 a^3 d}-\frac {3 i \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{8 a^3 d}-\frac {3 i \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{8 a^3 d}+\frac {3 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{8 a^3 d}+\frac {3 i \cos \left (4 e-\frac {4 c f}{d}\right ) \text {Si}\left (\frac {4 c f}{d}+4 f x\right )}{8 a^3 d}-\frac {3 \sin \left (4 e-\frac {4 c f}{d}\right ) \text {Si}\left (\frac {4 c f}{d}+4 f x\right )}{8 a^3 d}-\frac {i \cos \left (6 e-\frac {6 c f}{d}\right ) \text {Si}\left (\frac {6 c f}{d}+6 f x\right )}{8 a^3 d}+\frac {\sin \left (6 e-\frac {6 c f}{d}\right ) \text {Si}\left (\frac {6 c f}{d}+6 f x\right )}{8 a^3 d} \]
-1/8*Ci(6*c*f/d+6*f*x)*cos(-6*e+6*c*f/d)/a^3/d+3/8*Ci(4*c*f/d+4*f*x)*cos(- 4*e+4*c*f/d)/a^3/d-3/8*Ci(2*c*f/d+2*f*x)*cos(-2*e+2*c*f/d)/a^3/d+1/8*ln(d* x+c)/a^3/d-3/8*I*cos(-2*e+2*c*f/d)*Si(2*c*f/d+2*f*x)/a^3/d+3/8*I*cos(-4*e+ 4*c*f/d)*Si(4*c*f/d+4*f*x)/a^3/d-1/8*I*cos(-6*e+6*c*f/d)*Si(6*c*f/d+6*f*x) /a^3/d+1/8*I*Ci(6*c*f/d+6*f*x)*sin(-6*e+6*c*f/d)/a^3/d-1/8*Si(6*c*f/d+6*f* x)*sin(-6*e+6*c*f/d)/a^3/d-3/8*I*Ci(4*c*f/d+4*f*x)*sin(-4*e+4*c*f/d)/a^3/d +3/8*Si(4*c*f/d+4*f*x)*sin(-4*e+4*c*f/d)/a^3/d+3/8*I*Ci(2*c*f/d+2*f*x)*sin (-2*e+2*c*f/d)/a^3/d-3/8*Si(2*c*f/d+2*f*x)*sin(-2*e+2*c*f/d)/a^3/d
Time = 0.74 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.44 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=\frac {\log (c+d x)-3 \left (\cos \left (2 e-\frac {2 c f}{d}\right )+i \sin \left (2 e-\frac {2 c f}{d}\right )\right ) \left (\operatorname {CosIntegral}\left (\frac {2 f (c+d x)}{d}\right )+i \text {Si}\left (\frac {2 f (c+d x)}{d}\right )\right )+3 \left (\cos \left (4 e-\frac {4 c f}{d}\right )+i \sin \left (4 e-\frac {4 c f}{d}\right )\right ) \left (\operatorname {CosIntegral}\left (\frac {4 f (c+d x)}{d}\right )+i \text {Si}\left (\frac {4 f (c+d x)}{d}\right )\right )-\left (\cos \left (6 e-\frac {6 c f}{d}\right )+i \sin \left (6 e-\frac {6 c f}{d}\right )\right ) \left (\operatorname {CosIntegral}\left (\frac {6 f (c+d x)}{d}\right )+i \text {Si}\left (\frac {6 f (c+d x)}{d}\right )\right )}{8 a^3 d} \]
(Log[c + d*x] - 3*(Cos[2*e - (2*c*f)/d] + I*Sin[2*e - (2*c*f)/d])*(CosInte gral[(2*f*(c + d*x))/d] + I*SinIntegral[(2*f*(c + d*x))/d]) + 3*(Cos[4*e - (4*c*f)/d] + I*Sin[4*e - (4*c*f)/d])*(CosIntegral[(4*f*(c + d*x))/d] + I* SinIntegral[(4*f*(c + d*x))/d]) - (Cos[6*e - (6*c*f)/d] + I*Sin[6*e - (6*c *f)/d])*(CosIntegral[(6*f*(c + d*x))/d] + I*SinIntegral[(6*f*(c + d*x))/d] ))/(8*a^3*d)
Time = 1.85 (sec) , antiderivative size = 449, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 4211, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(c+d x) \left (a-i a \tan \left (e+f x+\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 4211 |
\(\displaystyle \int \left (\frac {i \sin ^3(2 e+2 f x)}{8 a^3 (c+d x)}-\frac {3 \sin ^2(2 e+2 f x)}{8 a^3 (c+d x)}-\frac {3 i \sin (2 e+2 f x)}{8 a^3 (c+d x)}+\frac {3 \sin (2 e+2 f x) \sin (4 e+4 f x)}{16 a^3 (c+d x)}+\frac {3 i \sin (4 e+4 f x)}{8 a^3 (c+d x)}-\frac {\cos ^3(2 e+2 f x)}{8 a^3 (c+d x)}+\frac {3 \cos ^2(2 e+2 f x)}{8 a^3 (c+d x)}-\frac {3 \cos (2 e+2 f x)}{8 a^3 (c+d x)}-\frac {3 i \sin (2 e+2 f x) \cos ^2(2 e+2 f x)}{8 a^3 (c+d x)}+\frac {1}{8 a^3 (c+d x)}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {3 i \operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{8 a^3 d}-\frac {i \operatorname {CosIntegral}\left (6 x f+\frac {6 c f}{d}\right ) \sin \left (6 e-\frac {6 c f}{d}\right )}{8 a^3 d}+\frac {3 i \operatorname {CosIntegral}\left (4 x f+\frac {4 c f}{d}\right ) \sin \left (4 e-\frac {4 c f}{d}\right )}{8 a^3 d}-\frac {3 \operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \cos \left (2 e-\frac {2 c f}{d}\right )}{8 a^3 d}+\frac {3 \operatorname {CosIntegral}\left (4 x f+\frac {4 c f}{d}\right ) \cos \left (4 e-\frac {4 c f}{d}\right )}{8 a^3 d}-\frac {\operatorname {CosIntegral}\left (6 x f+\frac {6 c f}{d}\right ) \cos \left (6 e-\frac {6 c f}{d}\right )}{8 a^3 d}+\frac {3 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{8 a^3 d}-\frac {3 \sin \left (4 e-\frac {4 c f}{d}\right ) \text {Si}\left (4 x f+\frac {4 c f}{d}\right )}{8 a^3 d}+\frac {\sin \left (6 e-\frac {6 c f}{d}\right ) \text {Si}\left (6 x f+\frac {6 c f}{d}\right )}{8 a^3 d}-\frac {3 i \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{8 a^3 d}+\frac {3 i \cos \left (4 e-\frac {4 c f}{d}\right ) \text {Si}\left (4 x f+\frac {4 c f}{d}\right )}{8 a^3 d}-\frac {i \cos \left (6 e-\frac {6 c f}{d}\right ) \text {Si}\left (6 x f+\frac {6 c f}{d}\right )}{8 a^3 d}+\frac {\log (c+d x)}{8 a^3 d}\) |
(-3*Cos[2*e - (2*c*f)/d]*CosIntegral[(2*c*f)/d + 2*f*x])/(8*a^3*d) + (3*Co s[4*e - (4*c*f)/d]*CosIntegral[(4*c*f)/d + 4*f*x])/(8*a^3*d) - (Cos[6*e - (6*c*f)/d]*CosIntegral[(6*c*f)/d + 6*f*x])/(8*a^3*d) + Log[c + d*x]/(8*a^3 *d) - ((I/8)*CosIntegral[(6*c*f)/d + 6*f*x]*Sin[6*e - (6*c*f)/d])/(a^3*d) + (((3*I)/8)*CosIntegral[(4*c*f)/d + 4*f*x]*Sin[4*e - (4*c*f)/d])/(a^3*d) - (((3*I)/8)*CosIntegral[(2*c*f)/d + 2*f*x]*Sin[2*e - (2*c*f)/d])/(a^3*d) - (((3*I)/8)*Cos[2*e - (2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/(a^3*d) + (3*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/(8*a^3*d) + (((3 *I)/8)*Cos[4*e - (4*c*f)/d]*SinIntegral[(4*c*f)/d + 4*f*x])/(a^3*d) - (3*S in[4*e - (4*c*f)/d]*SinIntegral[(4*c*f)/d + 4*f*x])/(8*a^3*d) - ((I/8)*Cos [6*e - (6*c*f)/d]*SinIntegral[(6*c*f)/d + 6*f*x])/(a^3*d) + (Sin[6*e - (6* c*f)/d]*SinIntegral[(6*c*f)/d + 6*f*x])/(8*a^3*d)
3.1.30.3.1 Defintions of rubi rules used
Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (1/(2*a) + Cos[2*e + 2*f*x]/( 2*a) + Sin[2*e + 2*f*x]/(2*b))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0] && ILtQ[m, 0] && ILtQ[n, 0]
Time = 1.09 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.38
method | result | size |
risch | \(\frac {\ln \left (d x +c \right )}{8 a^{3} d}+\frac {3 \,{\mathrm e}^{-\frac {2 i \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-2 i f x -2 i e -\frac {2 \left (i c f -i d e \right )}{d}\right )}{8 a^{3} d}-\frac {3 \,{\mathrm e}^{-\frac {4 i \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-4 i f x -4 i e -\frac {4 \left (i c f -i d e \right )}{d}\right )}{8 a^{3} d}+\frac {{\mathrm e}^{-\frac {6 i \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-6 i f x -6 i e -\frac {6 \left (i c f -i d e \right )}{d}\right )}{8 a^{3} d}\) | \(169\) |
1/8*ln(d*x+c)/a^3/d+3/8/a^3/d*exp(-2*I*(c*f-d*e)/d)*Ei(1,-2*I*f*x-2*I*e-2* (I*c*f-I*d*e)/d)-3/8/a^3/d*exp(-4*I*(c*f-d*e)/d)*Ei(1,-4*I*f*x-4*I*e-4*(I* c*f-I*d*e)/d)+1/8/a^3/d*exp(-6*I*(c*f-d*e)/d)*Ei(1,-6*I*f*x-6*I*e-6*(I*c*f -I*d*e)/d)
Time = 0.28 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.27 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=-\frac {3 \, {\rm Ei}\left (-\frac {2 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (-i \, d e + i \, c f\right )}}{d}\right )} - 3 \, {\rm Ei}\left (-\frac {4 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) e^{\left (-\frac {4 \, {\left (-i \, d e + i \, c f\right )}}{d}\right )} + {\rm Ei}\left (-\frac {6 \, {\left (-i \, d f x - i \, c f\right )}}{d}\right ) e^{\left (-\frac {6 \, {\left (-i \, d e + i \, c f\right )}}{d}\right )} - \log \left (\frac {d x + c}{d}\right )}{8 \, a^{3} d} \]
-1/8*(3*Ei(-2*(-I*d*f*x - I*c*f)/d)*e^(-2*(-I*d*e + I*c*f)/d) - 3*Ei(-4*(- I*d*f*x - I*c*f)/d)*e^(-4*(-I*d*e + I*c*f)/d) + Ei(-6*(-I*d*f*x - I*c*f)/d )*e^(-6*(-I*d*e + I*c*f)/d) - log((d*x + c)/d))/(a^3*d)
\[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=\frac {i \int \frac {1}{c \cot ^{3}{\left (e + f x \right )} - 3 i c \cot ^{2}{\left (e + f x \right )} - 3 c \cot {\left (e + f x \right )} + i c + d x \cot ^{3}{\left (e + f x \right )} - 3 i d x \cot ^{2}{\left (e + f x \right )} - 3 d x \cot {\left (e + f x \right )} + i d x}\, dx}{a^{3}} \]
I*Integral(1/(c*cot(e + f*x)**3 - 3*I*c*cot(e + f*x)**2 - 3*c*cot(e + f*x) + I*c + d*x*cot(e + f*x)**3 - 3*I*d*x*cot(e + f*x)**2 - 3*d*x*cot(e + f*x ) + I*d*x), x)/a**3
Time = 0.42 (sec) , antiderivative size = 275, normalized size of antiderivative = 0.61 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=\frac {f \cos \left (-\frac {6 \, {\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac {6 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) - 3 \, f \cos \left (-\frac {4 \, {\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac {4 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) + 3 \, f \cos \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) - 3 i \, f E_{1}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) + 3 i \, f E_{1}\left (\frac {4 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) \sin \left (-\frac {4 \, {\left (d e - c f\right )}}{d}\right ) - i \, f E_{1}\left (\frac {6 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) \sin \left (-\frac {6 \, {\left (d e - c f\right )}}{d}\right ) + f \log \left ({\left (f x + e\right )} d - d e + c f\right )}{8 \, a^{3} d f} \]
1/8*(f*cos(-6*(d*e - c*f)/d)*exp_integral_e(1, 6*(-I*(f*x + e)*d + I*d*e - I*c*f)/d) - 3*f*cos(-4*(d*e - c*f)/d)*exp_integral_e(1, 4*(-I*(f*x + e)*d + I*d*e - I*c*f)/d) + 3*f*cos(-2*(d*e - c*f)/d)*exp_integral_e(1, 2*(-I*( f*x + e)*d + I*d*e - I*c*f)/d) - 3*I*f*exp_integral_e(1, 2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d)*sin(-2*(d*e - c*f)/d) + 3*I*f*exp_integral_e(1, 4*(-I *(f*x + e)*d + I*d*e - I*c*f)/d)*sin(-4*(d*e - c*f)/d) - I*f*exp_integral_ e(1, 6*(-I*(f*x + e)*d + I*d*e - I*c*f)/d)*sin(-6*(d*e - c*f)/d) + f*log(( f*x + e)*d - d*e + c*f))/(a^3*d*f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1791 vs. \(2 (411) = 822\).
Time = 0.39 (sec) , antiderivative size = 1791, normalized size of antiderivative = 3.99 \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=\text {Too large to display} \]
-1/8*(cos(e)^6*cos(6*c*f/d)*cos_integral(6*(d*f*x + c*f)/d) + 6*I*cos(e)^5 *cos(6*c*f/d)*cos_integral(6*(d*f*x + c*f)/d)*sin(e) - 15*cos(e)^4*cos(6*c *f/d)*cos_integral(6*(d*f*x + c*f)/d)*sin(e)^2 - 20*I*cos(e)^3*cos(6*c*f/d )*cos_integral(6*(d*f*x + c*f)/d)*sin(e)^3 + 15*cos(e)^2*cos(6*c*f/d)*cos_ integral(6*(d*f*x + c*f)/d)*sin(e)^4 + 6*I*cos(e)*cos(6*c*f/d)*cos_integra l(6*(d*f*x + c*f)/d)*sin(e)^5 - cos(6*c*f/d)*cos_integral(6*(d*f*x + c*f)/ d)*sin(e)^6 - I*cos(e)^6*cos_integral(6*(d*f*x + c*f)/d)*sin(6*c*f/d) + 6* cos(e)^5*cos_integral(6*(d*f*x + c*f)/d)*sin(e)*sin(6*c*f/d) + 15*I*cos(e) ^4*cos_integral(6*(d*f*x + c*f)/d)*sin(e)^2*sin(6*c*f/d) - 20*cos(e)^3*cos _integral(6*(d*f*x + c*f)/d)*sin(e)^3*sin(6*c*f/d) - 15*I*cos(e)^2*cos_int egral(6*(d*f*x + c*f)/d)*sin(e)^4*sin(6*c*f/d) + 6*cos(e)*cos_integral(6*( d*f*x + c*f)/d)*sin(e)^5*sin(6*c*f/d) + I*cos_integral(6*(d*f*x + c*f)/d)* sin(e)^6*sin(6*c*f/d) + I*cos(e)^6*cos(6*c*f/d)*sin_integral(6*(d*f*x + c* f)/d) - 6*cos(e)^5*cos(6*c*f/d)*sin(e)*sin_integral(6*(d*f*x + c*f)/d) - 1 5*I*cos(e)^4*cos(6*c*f/d)*sin(e)^2*sin_integral(6*(d*f*x + c*f)/d) + 20*co s(e)^3*cos(6*c*f/d)*sin(e)^3*sin_integral(6*(d*f*x + c*f)/d) + 15*I*cos(e) ^2*cos(6*c*f/d)*sin(e)^4*sin_integral(6*(d*f*x + c*f)/d) - 6*cos(e)*cos(6* c*f/d)*sin(e)^5*sin_integral(6*(d*f*x + c*f)/d) - I*cos(6*c*f/d)*sin(e)^6* sin_integral(6*(d*f*x + c*f)/d) + cos(e)^6*sin(6*c*f/d)*sin_integral(6*(d* f*x + c*f)/d) + 6*I*cos(e)^5*sin(e)*sin(6*c*f/d)*sin_integral(6*(d*f*x ...
Timed out. \[ \int \frac {1}{(c+d x) (a+i a \cot (e+f x))^3} \, dx=\int \frac {1}{{\left (a+a\,\mathrm {cot}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3\,\left (c+d\,x\right )} \,d x \]